<?php
// 应用公共文件


function diffBetweenTwoDays ($day1, $day2)
{
    $second1 = strtotime($day1);
    $second2 = strtotime($day2);

    if ($second1 < $second2) {
        $tmp = $second2;
        $second2 = $second1;
        $second1 = $tmp;
    }
    return ($second1 - $second2) / 86400;
}


/**
 * Notes:
 * User: liuhailong
 * DateTime: 2022/3/29 14:49
 * @param $length
 * @return false|string
 * //随机生成昵称
 */
function randNickName($length){

    $randStr = str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
    $rand_name = substr($randStr,0,$length);
    return $rand_name;
}